import React, {PureComponent} from 'react'
import Table from 'antd/lib/table'
import Input from 'antd/lib/input'
import Icon from 'antd/lib/icon'

/*物料*/
class MaterialTable extends PureComponent {
    constructor() {
        super()
    }

    componentDidMount() {

    }

    render() {
        const {clickToDetail}  = this.props

        const columns = [
            {
                title: '物料编码',
                dataIndex: 'key',
                key: 'key',
                onCellClick(){
                    clickToDetail(true)
                },
                className:'go-down'
            },
            {
                title: '物料名称',
                dataIndex: 'name',
                key: 'name',
            },{
                title: '状态',
                dataIndex: 'age',
                key: 'age',
            }
        ];

        const data = [];

        for (let i = 0; i < 20; i++) {
            data.push({
                key: 'EPH349C9S' + i,
                name: 'WF',
                age: '备货完成',
            })
        }

        return (
            <div className="order-table-container">
                <Table columns={columns} dataSource={data} pagination={{pageSize:15}}/>
            </div>
        )
    }

}

export default MaterialTable